/*
 * Copyright (c) 2007 Compl Yue Still, All Rights Reserved.
 */

package oex.pilot
{
	import flash.display.*;
	import flash.utils.*;
	
	import hbi.as3.utils.*;
	import hbi.domain.as3.AS3Gateway;
	
	import mx.controls.Alert;
	
	import oex.*;
	import oex.tasks.*;
	
	public class Test
	{
		
		public function Test(obj:InteractiveObject):void
		{
			var gateway:AS3Gateway = ObjectExplorer(obj).gateway;
			if(gateway)
			{
				gateway.sendTaskAgent(Greeting,
				
				// use this form or there will be error at runtime
				function(g:Object):void
				
				// use this form at development time for auto arguments completion:
	//			function(g:Greeting):void
				
				{
					g.sayHello("Flash World");
					g.greetPeople(["Compl", "Chris"]);
					g.displayNumbers([1, 2, 7.6]);
				});
			}
			else
			{
				Alert.show("HBI not connected!");
			}
		}
		
	}
}